Shadow Door User's Manual

Copyright 2003 by Robert Zubek and Phillip Saltzman, Northwestern University
shadow-door-dev@cs.northwestern.edu

 

Running our sample code: Eliza

Eliza is a classic AI system that attempts to mimic a conversation with a Rogerian psychoanalyst. We have included a simple Common Lisp re-implementation, which will use to explain how to get the system running.

 

Setup

To run Eliza, you will need:

 

Execution

ACL will run at the same time as the NWServer, and control an NPC in the game named Eliza.

1. Let's start the game server.

Run the NWNX2 Shadow Door executable - it will start both NWNX2 and the NWServer. You can exit NWNX2 - it provides some extra functionality that we won't need in this example. In the NWServer, under Module Name, pick Shadow Door Example Module and hit Load. The server status bar should change to: "Running, login at will".

2. Now let's get the external AI system running.

Run ACL - it will open up a development environment with several windows. Select File | Open Project ... from the menu, and then find and load the eliza-demo-allegro.lpr (in the Shadow Door\LISP Sources folder).

Finally, you should see a prompt that looks like:

  CG-USER(1):

Type the following two commands at the prompt, as seen below:

  cg-user(1): (in-package common-lisp-user)
#<The common-lisp-user package>


cl-user(2): (shadow-door-eliza-loop)
...

This will start the Eliza loop - Lisp will simply print dots to let you know it's running, and all of the functionality will now happen inside the game.

3. Log into the game.

Start Neverwinter Nights. In the main menu choose Multiplayer, log in with your multiplayer account, then select Join LAN Game. Pick the Shadow Door game, pick your character, and you're in!

You'll find yourself in a small room with Eliza. Start talking to her and she will respond with new utterances based on what you said. Your likes, dislikes, hopes, and dreams are always good topics. Some hard-wired reactions: saying "hi" will result in a courteous bow, "I hate you" will provoke an attack, and saying "!quit" will shut down the AI.